<template>
    <div class='_container'>
        <div class='_title' ref='title'>
            <slot name='title'></slot>
        </div>
        <div class='_body'>
            <slot></slot>
        </div>
    </div>
</template>

<script>
    export default {
        name : 'title-body',

        mounted () {
            var title = this.$refs.title
            title.style.lineHeight = title.clientHeight + 'px'
        }
    }
</script>

<style scoped lang='scss'>
    ._container{
        display: flex;
        ._body{
            flex: 1;
            position: relative;
        }
    }
</style>